package com.wangxinyuchuan.demo.factory_method;

/**
 * @author wangxinyuchuan
 * @date 2023/4/12 10:21 AM
 */
public abstract class Factory {

    public final Product create(String owner) {
        Product p = createProduct(owner);
        registerProduct(p);
        return p;
    }

    protected abstract Product createProduct(String owner);

    protected abstract void registerProduct(Product product);
}
